﻿using OMG.Fill.Mulberry.Model.Ent;
using OMG.Fill.Mulberry.Service;
using ProjectShare;
using System.Collections.Generic;
using System.Web.Http;
namespace OMG.Fill.Mulberry.Model.UI.Controllers
{
    public class LogsController : ApiController
    {
        LogsServices logsServices = new LogsServices();
        
        //[ApiActionAuthorize("获取操作日志T_Logs分页列表对象操作")]
        //[ApiActionException]
        public Pager<List<LogsModel>> PostPageList(LogsQuery query)
        {
            return logsServices.GetPageList(query);
        }
        //[ApiActionAuthorize("新增操作日志T_Logs指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Post(LogsEntity model) {
            return logsServices.AddInfo(model);
        }
        //[ApiActionAuthorize("修改操作日志T_Logs指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Put(LogsEntity model)
        {
            return logsServices.UpdateInfo(model);
        }
        //[ApiActionAuthorize("删除操作日志T_Logs指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Delete(string id)
        {
            return logsServices.DeleteInfo(id);
        }
        //[ApiActionAuthorize("获取操作日志T_Logs指定对象操作")]
        //[ApiActionException]
        public ResResult<LogsEntity> Get(string id)
        {
            return logsServices.GetModel(id);
        }
    }
}